<div id="actionbar">
    <form id="form" action="{:url('bestbao/order/selectProduct')}" method="get">
        <input type="hidden" name="id" value="{$id}" />
        <input type="hidden" name="input" value="{$input}" />
        <input placeholder="请输入标题" class="input w200" type="text" name="keyword" value="{$keyword}" />
        <input type="submit" value="搜索" class="button button-blue" />
    </form>
</div>
<table class="table">
    <thead>
        <tr>
            <th class="w100">操作</th>
            <th class="w80">code</th>
            <th class="w140">名称</th>
            <th class="w140">说明</th>
            <th class="w140">创建时间</th>
        </tr>
    </thead>
    <tbody>
        {foreach $list as $vo}
        <tr>
            <td><a href="javascript:;" class="button selectID" title="选择" data-id="{if $input == 'miniapp_uid'}{$vo.miniapp_uid}{elseif $input == 'official_uid' /}{$vo.official_uid}{else}{$vo.id}{/if}"><i class="iconfont icon-text_icon"></i>选择</a></td>
            <td>{$vo.code}</td>
            <td>{$vo.title}</td>
            <td>{$vo.note}</td>
            <td>{$vo->create_time|date='Y-m-d H:i'}</td>
        </tr>
        {/foreach}
    </tbody>
</table>
{$list|raw}
<script type="text/javascript">
    Do('base','layer',function(){
        var index = parent.layer.getFrameIndex(window.name);
        $('.selectID').click(function(){
            var member_id = $(this).attr('data-id');
            parent.$("#iframe").contents().find("#{$input}").val(member_id);
            parent.layer.close(index); 
        });
    })
</script>